const Message = require('./Message');

class ScreenShare extends Message {
	constructor(headerFields, routing) {
		routing = Object.assign({}, { sender: 'bbb-html5' }, routing)
		headerFields = Object.assign({}, { operation: 'start' }, headerFields)
		super(null, routing, headerFields);
		this.core.body = {
			events: {
				start: 'ClfAgoraIndividualScreenStarted',
				stop: 'ClfAgoraIndividualScreenStopped'
			}
		}
	}

	set operation(event) {
		this.core.header['operation'] = event
	}

	setArgs(userId, channelName, meetingId, uid, type) {
		this.core.body['args'] = { userId, channelName, meetingId, uid, type }
	}

}

module.exports = ScreenShare
